{include file="public/header" /}



<div class="page">
    <div class="fixed-bar">
        <div class="item-title">
            <div class="subject">
                <h3>{$Think.lang.wechat_menu}</h3>
                <h5></h5>
            </div>
            {include file="public/admin_items" /}
            <a href="{:url('Wechat/pub_menu')}"  class="btn btn-small" style="float: right">{$Think.lang.wechat_menu_update}</a>
        </div>
    </div>
     <div class="explanation" id="explanation">
        <div class="title" id="checkZoom">
            <h4 title="{$Think.lang.ds_explanation_tip}">{$Think.lang.ds_explanation}</h4>
            <span id="explanationZoom" title="{$Think.lang.ds_explanation_close}" class="arrow"></span>
        </div>
        <ul>
            <li>{$Think.lang.wechat_menu_help1}</li>
            <li>{$Think.lang.wechat_menu_help2}</li>
            <li>{$Think.lang.wechat_menu_help3}</li>
            <li>{$Think.lang.wechat_menu_help4}</li>
            <li>{$Think.lang.wechat_menu_help5}</li>
        </ul>
    </div>
            <table class="ds-default-table">
                <thead>
                <tr>
                    <th>{$Think.lang.menu_name}</th>
                    <th>{$Think.lang.menu_type}</th>
                    <th>{$Think.lang.menu_value}</th>
                    <th>{$Think.lang.menu_sort}</th>
                    <th>{$Think.lang.ds_handle}</th>
                </tr>
                </thead>
                {notempty name="p_menu"}
                <tbody>
                {foreach name="p_menu" item="pmenu"}
                <tr>
                    <td>{$pmenu.name}</td>
                    <td>{$menu_type[$pmenu.type]}</td>
                    <td>{$pmenu.value}</td>
                    <td>{$pmenu.sort}</td>
                    <td>
                        <a href="javascript:dsLayerOpen('{:url('Wechat/menu_edit',['id'=>$pmenu.id])}','{$Think.lang.ds_edit}-{$pmenu.name}')" class="dsui-btn-edit"><i class="iconfont"></i>{$Think.lang.ds_edit}</a>
                        <a href="javascript:dsLayerConfirm('{:url('Wechat/menu_drop',['id'=>$pmenu.id])}','{$Think.lang.ds_ensure_del}')"  class="dsui-btn-del"><i class="iconfont"></i>{$Think.lang.ds_del}</a>
                    </td>
                </tr>
                {foreach name="c_menu[$pmenu.id]" item="cmenu"}
                {if $cmenu.pid eq $pmenu.id}
                <tr>
                    <td>|___{$cmenu.name}</td>
                    <td>{$menu_type[$cmenu.type]}</td>
                    <td>{$cmenu.value}</td>
                    <td>{$cmenu.sort}</td>
                    <td>
                        <a href="javascript:dsLayerOpen('{:url('Wechat/menu_edit',['id'=>$cmenu.id])}','{$Think.lang.ds_edit}-{$cmenu.name}')"  class="dsui-btn-edit"><i class="iconfont"></i>{$Think.lang.ds_edit}</a>
                        <a href="javascript:dsLayerConfirm('{:url('Wechat/menu_drop',['id'=>$cmenu.id])}','{$Think.lang.ds_ensure_del}')"  class="dsui-btn-del"><i class="iconfont"></i>{$Think.lang.ds_del}</a>
                    </td>
                </tr>
                {/if}
                {/foreach}
                {/foreach}
                </tbody>
                {else /}
                <tbody>
            <tr class="no_data">
                <td colspan="20">{$Think.lang.no_record}</td>
            </tr>
        </tbody>
                {/notempty}
            </table>
        </div>